﻿using Microsoft.AspNetCore.Mvc.ModelBinding;
using Microsoft.Build.Framework;
using System.ComponentModel.DataAnnotations;

namespace MVC.Models
{
    public class UserInfo
    {
        private int _id;
        private string? _name;
        private string? _password;
        private string? _confirmPassword;

   
        [BindNever]
        public int Id
        {
            get => _id;
            set => _id = value;
        }

        [BindRequired]
        public string? Name
        {
            get => _name;
            set => _name = value ?? throw new ArgumentNullException(nameof(value));
        }

        public string? Password
        {
            get => _password;
            set => _password = value ?? throw new ArgumentNullException(nameof(value));
        }

        public string? ConfirmPassword
        {
            get => _confirmPassword;
            set => _confirmPassword = value ?? throw new ArgumentNullException(nameof(value));
        }

       

        
    }
}
